import profile
import tkinter.simpledialog
import helpers.FileHelper as FileHelper
import helpers.MiscHelper as MiscHelper
import helpers.MathHelper as MathHelper
import helpers.GUIHelper as GUIHelper
import package.PackageManager as PackageManager


def cmd_gsw(opts, args):
    std_dev = 1
    steps = 4
    half = False
    for k in opts:
        v = opts[k]
        if k in ("n", "steps"):
            steps = int(v)
        elif k in ("d", "dev"):
            std_dev = float(v)
        elif k in ("h", "half"):
            half = True
    print(opts)
    print(std_dev)
    print(steps)
    print(half)
    w = MathHelper.gaussian_weight(steps, std_dev, half)
    GUIHelper.print_and_copy_clipboard(w)
